﻿/*
 * taskagent.hpp
 *
 *  Created on: 2018年2月13日
 *      Author: work
 */

#ifndef _DM_OS_SYS_TASKAGENT_HPP_
#define _DM_OS_SYS_TASKAGENT_HPP_

#include <dm/export.hpp>

#ifndef DM_API_OS_SYS
#define DM_API_OS_SYS DM_API_IMPORT
#endif

#include <dm/os/sys/sysinfo.hpp>

namespace dm{
namespace os{
namespace sys{

class DM_API_OS_SYS CTaskAgent:public CSysInfo{
public:
	static CTaskAgent* TaskAgent;

	CTaskAgent( const char* program,const char* paras=NULL );
	CTaskAgent( const int& argc,char* argv[] );
	~CTaskAgent();

	bool ifCanRun();

	bool runOnce();

	void exit();

protected:
	void init( const char* program,const char* paras );

private:
	int m_idx;
};

}
}
}

#endif /* DM_RUNTIME_INCLUDE_DM_OS_SYS_TASKAGENT_HPP_ */
